package cn.edu.neu.service.impl;

import cn.edu.neu.dao.TravelNotesTypeDao;
import cn.edu.neu.model.TravelNotesType;
import cn.edu.neu.service.TravelNotesTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TravelNotesTypeServiceImpl implements TravelNotesTypeService {
    @Autowired
    private TravelNotesTypeDao travelNotesTypeDao;
    @Override
    public List<TravelNotesType> getTravelNotesTypeList() {
        return travelNotesTypeDao.getTravelNotesTypeList();
    }

    @Override
    public int insertTravelNotesType(TravelNotesType travelNotesType) {
        return travelNotesTypeDao.insert(travelNotesType);
    }

    @Override
    public TravelNotesType getTravelNotesTypeById(Integer id) {
        return travelNotesTypeDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateTravelNotesType(TravelNotesType travelNotesType) {
        return travelNotesTypeDao.updateByPrimaryKey(travelNotesType);
    }

    @Override
    public int deleteTravelNotesType(Integer id) {
        return travelNotesTypeDao.deleteByPrimaryKey(id);
    }
}
